package myjava.collections;

import java.util.*;

public class _TreeSet {

   public static void main(String[] args) {

      /**
       * sort the elements according to the nature of the elements itself
       */
      TreeSet<String> o = new TreeSet<String>();
      o.add("c");
      o.add("a");
      o.add("z");
      o.add("b");

      for (String s : o) {
         System.out.println(s);
      }
   }
}
